import Vue from 'vue'
import VueRouter from 'vue-router'

// import Layout from '@/layout'
import Layout from '@/layout'
Vue.use(VueRouter)

const routes = [
  {
    path: '/login',
    component: () => import('@/views/login/index')
  },

  {
    path: '/404',
    component: () => import('@/views/404')

  },
  {
    path: '/',
    component: Layout,
    redirect: '/dashboard',
    children: [
      { path: 'dashboard', component: () => import('@/views/dashboard') }
    ]

  }
]

const router = new VueRouter({
  routes
})

export default router
